package com.horizon.im.imServer.protoBuilder;

import com.horizon.im.common.bean.msg.ProtoMsg;

public class NotificationMsgBuilder {
    public static ProtoMsg.Message buildNotification(String json) {
        ProtoMsg.Message.Builder mb =ProtoMsg.Message.newBuilder()
                .setType(ProtoMsg.HeadType.MESSAGE_NOTIFICATION);

        //设置应答流水，与请求对应
        ProtoMsg.MessageNotification.Builder nb = ProtoMsg.MessageNotification.newBuilder()
                .setJson(json);
        mb.setNotification(nb.build());
        return mb.build();
    }
}
